package com.huang.service;

import com.huang.dao.StudentMapper;
import com.huang.pojo.Student;

import java.util.List;

/**
 * @Author:huang
 * @Date: Created in 2021/5/16 7:22
 */

public class StudentServiceImpl implements StudentService {

//    @Autowired
    private StudentMapper studentMapper;

    public void setStudentMapper(StudentMapper studentMapper){
        this.studentMapper = studentMapper;
    }

    @Override
    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    @Override
    public int deleteStudentById(int id) {
        return studentMapper.deleteStudentById(id);
    }

    @Override
    public Student queryById(int id) {
        return studentMapper.queryById(id);
    }

    @Override
    public List<Student> queryAll() {
        return studentMapper.queryAll();
    }
}
